#include <stdio.h>
long u, v;
void addrat(int, int);
void lowterm();
void fun(){
    int n, nterm;
    printf("请输入项数：");
    scanf("%d", &n);
    if (n<=0)
        printf("输入错误！\n");
    else if(n==1)
        printf("1/1\n");
    else
    {
        u = 1;
        v = 1;
        for (nterm=2; nterm<=n; nterm++)
        {
            u=u*nterm+v;
            v*=nterm;
        }  
        int x=u/v;
        printf("%d*(%d/%d)\n", x,(u-x*v), v);
    }
}
int main()
{
    fun();
    return 0;
}